import logging
import yagmail
def sent_log():
    logging.basicConfig(filename="log.log",filemode="a+",
                        format="%(message)s-%(thread)d-%(levelno)s-%(lineno)d",
                        level=logging.DEBUG)

def sent_email(file):
    em=yagmail.SMTP(user='2834326498@qq.com',password='ygjjxpwwggovdcia',host='smtp.qq.com')
    em.send(to='2834326498@qq.com',subject='5.18',contents='lian',attachments=file)